<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 
<jsp:useBean id="bean" class="com.lmpop.frame.util.RandomID" scope="page" />
<%@page import="com.lmpop.trade.ti_organize.*" %>
<%
	String org_id = bean.GenTradeId();
	String up_orgId = "";
	if (request.getParameter("up_org_id") != null && !request.getParameter("up_org_id").equals("")) {
		up_orgId = request.getParameter("up_org_id");
	}else{
		up_orgId = "000000000000000";
	}
	String org_class = "";
	if (request.getParameter("org_class") != null && !request.getParameter("org_class").equals("")) {
		org_class = request.getParameter("org_class");
	}
	if( org_class.equals("")){
		org_class = "1";
	}else{
		org_class = String.valueOf(Integer.parseInt(org_class) + 1);
	}
	Ti_organizeInfo ti_organizeInfo = new Ti_organizeInfo();
	String up_org_name = ti_organizeInfo.getOrgNameById(up_orgId);
	if(up_org_name == null || up_org_name.equals("")){
		up_org_name = "无上级部门";
	}
%>
<html>
  <head>
    <title>新增组织结构</title>
	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="organize.js" charset="UTF-8" ></script>
	<script type="text/javascript" src="/program/admin/js/judgment.js" charset="UTF-8"></script>
</head>

<body>
	<h1>新增组织结构</h1>
	<!--table width="100%" align="center" cellpadding="0" cellspacing="0" class="dl_so">
        <tr>
          <td width="9%" align="center"><img src="/program/admin/index/images/ban_01.gif" /></td>
          <td width="91%" align="left">
		  <h4>您可以按“行业”或“关键字”订阅</h4>
		  <span>1、填写关键字，您将及时了解与该产品相关的所有商机。</span><br/>
		  <span>2、为了更准确订阅，建议你选择产品所属的行业大类和行业子类。</span>
		  </td>
        </tr>
      </table-->
	<form action="/doTradeReg.do" method="post" name="addForm">
	<table width="100%" cellpadding="1" cellspacing="1" border="0" class="listtab">
		
		<tr>
			<td align="right" width="10%">
				部门名称<font color="red">*</font>
			</td>
			<td><input name="org_name" id="org_name" type="text" value="" maxlength="20" size="37" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this); " /></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				上级部门:
			</td>
			<td><%=up_org_name%><input name="up_org_id" id="up_org_id" type="hidden" value="<%=up_orgId%>" /></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				部门级别:
			</td>
			<td><%=org_class%><input name="org_class" id="org_class" type="hidden" value="<%=org_class%>" /></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				部门简介:
			</td>
			<td><textarea name="org_desc" id="org_desc" rows="3" cols="40" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this); "></textarea></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				备注:
			</td>
			<td><input name="remark" id="remark" type="text" size="37" maxlength="30" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this); " /></td>
		</tr>
		
	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input type="hidden" name="bpm_id" value="3434" />
				<input name="org_id" id="org_id" type="hidden" value="<%=org_id%>" />
				<input class="buttoncss" type="submit" name="tradeSub" value="提交" onclick="return submitValues()" />&nbsp;&nbsp;
				<input class="buttoncss" type="button" name="tradeRut" value="返回" onclick="window.location.href='index.jsp';"/>
			</td>
		</tr>
	</table>
	</form>
</body>

</html>
